<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;  
use Illuminate\Support\Facades\Log;  
use App\Models\OrderColor;
use App\Models\Requirement;
use App\Models\Project;
use App\Models\Feature;
use App\Models\Module;

class RequirementsController extends Controller
{
    
    public function requirements(Request $request)
    { 
        $module_id = $request->get('q');
        return Requirement::where([
            ['module_id', $module_id],
            ['status',NULL]
        ])->get(['id', \DB::raw('name as text')]);
    }

    //优先级
    public function order_colors() {  
        return OrderColor::get(['id', \DB::raw('name as text')]);
    }  
}
